﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using WinDemo.Core;
using System.Windows.Forms;


namespace PosPlugin
{
    [PluginInfo("Pos", "1.0", "XH", "www.cnporter.com", true,1)]
    public class Pos : WinDemo.Core.Iplugin
    {
        private Dictionary<string, EventHandler> _ChildNodes = new Dictionary<string, EventHandler>();
        internal static FrmLeftNav FrmLeftnav = new FrmLeftNav();
        internal static FrmUserGrid FrmUsergrid = new FrmUserGrid();
        public static ILoadForm Formloader;
        public Pos()
        {

           
            _ChildNodes.Add("数据报表", (sender, e) =>
            {
                MessageBox.Show(sender.ToString());
            });
            _ChildNodes.Add("查询交易", (sender, e) =>
            {
                MessageBox.Show(sender.ToString());
            });
            _ChildNodes.Add("收银管理", (sender, e) =>
            {
                PopForm frm = new PopForm();
                frm.Show();
            });
            _ChildNodes.Add("会员刷卡", (sender, e) =>
            {
                FormLoader.LoadNavFrm(FrmLeftnav);
                FormLoader.LoadContentFrm(FrmUsergrid);
            });
        }



        public Image ModulePicture
        {
            get
            {
                return ((System.Drawing.Image)(ImageResource.PosNormal));
            }
        }

        public Image ModulePictureEnter
        {
            get
            {
                return ((System.Drawing.Image)(ImageResource.PosEnter));
            }
        }

        public Image ModulePictureClick
        {
            get
            {
                return ((System.Drawing.Image)(ImageResource.PosClick));
            }
        }

        public string ModuleName
        {
            get
            {
                return "Pos管理";
            }
        }

        public Dictionary<string, EventHandler> ChildNodes
        {
            get
            {
                return _ChildNodes;
            }
        }




        public bool IsLoad
        {
            get;
            set;
        }

        public ILoadForm FormLoader
        {
            get
            {
                return Formloader;
            }
            set
            {
                Formloader = value;
            }
        }



        public PluginInfoAttribute PluginInfo
        {
            get;
            set;
        }
    }


}

